/*
 * @Author: zhou5228 10892268+zhou5228@user.noreply.gitee.com
 * @Date: 2022-10-24 17:05:16
 * @LastEditors: zhou5228 10892268+zhou5228@user.noreply.gitee.com
 * @LastEditTime: 2022-12-06 16:36:17
 * @FilePath: \project-name\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Home from '../components/index/home/Home'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Login
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path: '/index/:title',
    name: 'index',
    component: () => import('../views/Index.vue'),
    children:[
      {
        path:'/',
        redirect:Home
      },
      {
        path: 'home',
        name: 'home',
        component:Home
      },
      {
        path: 'clocking',
        name: 'clocking',
        component: () => import('../components/index/content/Clocking.vue')
      },
      {
        path: 'gocome',
        name: 'gocome',
        component: () => import('../components/index/content/GoCome.vue')
      },
      {
        path: 'visit',
        name: 'visit',
        component: () => import('../components/index/content/Visit.vue')
      },
      {
        path: 'userinfo',
        name: 'userinfo',
        component: () => import('../components/index/user/UserInfo.vue')
      },
      {
        path: 'recordc',
        name: 'recordc',
        component: () => import('../components/index/user/RecordC.vue')
      },
      {
        path: 'recordg',
        name: 'recordg',
        component: () => import('../components/index/user/RecordG.vue')
      },
      {
        path: 'recordv',
        name: 'recordv',
        component: () => import('../components/index/user/RecordV.vue')
      },
      ]
  },
  {
    path: '/register',
    name: 'register',
    component: () => import('../views/Register.vue')
  }
  

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
